<?php
        global $Room;
        $id=$connection->user['room'];
        if($Room[$id]['time3']==0){
            return false;
        }
        $connection->user['qbank']=$data2['zt'];
        $Room[$id]['user'][$connection->user['id']]->user['qbank']=$data2['zt'];

        $msg=array();
        $msg['id']='operationButton';
        if($Room[$id]['type']==1){
            $wz='go';
        }
        else{
            $wz='rob';
        }
        if($data2['zt']){
            if($data2['zt']>$Room[$id]['beishu']){
                $Room[$id]['beishu']=$data2['zt'];
                $msg3['bd']=1;
            }
            if($Room[$id]['type']==4){
                $img2='/app/img/X-'.$data2['zt'].'.png';
                $img='/app/img/bull9/bull_text_'.$wz.'.png';
            $msg['html']='<div id="jiurenniuniu-qiangzhuangs" class="jiurenniuniu-qiangzhuangs" style="display: block">
            <img class="jiurenniuniu-qiangzhuangs-img" src="/app/img/bull9/bull_text_'.$wz.'.png">
         </div><div id="jiurenniuniu-qiangzhuangs" class="jiurenniuniu-qiangzhuangs" style="display: block;
    width: 22px;
    left: 65px;
    height: 22px;
    top: 24px;"><img class="jiurenniuniu-qiangzhuangs-img" src="/app/img/X-'.$data2['zt'].'.png"></div>';
                $mp3='qiangzhuang';
            //$mp3='xia'.$data2['zt'];
            }
            else{
            $img='/app/img/bull9/bull_text_'.$wz.'.png';
            $msg['html']='<div id="jiurenniuniu-qiangzhuangs" class="jiurenniuniu-qiangzhuangs" style="display: block;">
            <img class="jiurenniuniu-qiangzhuangs-img" src="/app/img/bull9/bull_text_'.$wz.'.png">
         </div>';
                $mp3='qiangzhuang';
            }
        }
        else{
            $img='/app/img/bull9/bull_text_not'.$wz.'.png';
            $msg['html']='<div id="jiurenniuniu-qiangzhuangs" class="jiurenniuniu-qiangzhuangs" style="display: block;">
        <img class="jiurenniuniu-qiangzhuangs-img" src="/app/img/bull9/bull_text_not'.$wz.'.png">
     </div>';
            $mp3='buqiang';

        }
        act('html',$msg,$connection);


        $zbsl=0;
        $qbsl=0;
        foreach ($Room[$id]['user'] as $connection3) {
            if($connection3->user['zt']=='1'){
                $zbsl=$zbsl+1;
            }
            if($connection3->user['qbank']!='-1' && $connection3->user['zt']=='1'){
                $qbsl=$qbsl+1;
            }
            if( $connection3->user['online']!='-1'){
                act('mp3play',$mp3,$connection3);
            }
            $msg=array();
            $msg['index']=$connection->user['index'];
            $msg['img']=$img;
            if($connection->user['id']!=$connection3->user['id'] && $connection3->user['online']!='-1'){
                if($img2){
                    $msg2=array();
                    act('showmemberRobText2',$msg,$connection3);
                    $msg2['index']=$connection->user['index'];
                    $msg2['img']=$img2;
                    act('showmemberTimesText2',$msg2,$connection3);
                }
                else{
                    act('showmemberRobText',$msg,$connection3);
                }
            }
        }
        if($zbsl==$qbsl && $Room[$id]['xx']['zt']=='3'){
            $Room[$id]['xx']['zt']='4';
            $data=array();
            $data['act']='setbank';
            $data['room']=$id;
            reqact($data,'');
        }


